Optimal. Leaf size=191 \[ -\frac {\sqrt {2} (A-B+C) \tanh ^{-1}\left (\frac {\sqrt {a} \sqrt {\sec (c+d x)} \sin (c+d x)}{\sqrt {2} \sqrt {a+a \sec (c+d x)}}\right )}{\sqrt {a} d}+\frac {2 A \sin (c+d x)}{5 d \sec ^{\frac {3}{2}}(c+d x) \sqrt {a+a \sec (c+d x)}}-\frac {2 (A-5 B) \sin (c+d x)}{15 d \sqrt {\sec (c+d x)} \sqrt {a+a \sec (c+d x)}}+\frac {2 (13 A-5 B+15 C) \sqrt {\sec (c+d x)} \sin (c+d x)}{15 d \sqrt {a+a \sec (c+d x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.35, antiderivative size = 191, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 5, integrand size = 45, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {4171, 4107,
4098, 3893, 212} \begin {gather*} \frac {2 (13 A-5 B+15 C) \sin (c+d x) \sqrt {\sec (c+d x)}}{15 d \sqrt {a \sec (c+d x)+a}}-\frac {\sqrt {2} (A-B+C) \tanh ^{-1}\left (\frac {\sqrt {a} \sin (c+d x) \sqrt {\sec (c+d x)}}{\sqrt {2} \sqrt {a \sec (c+d x)+a}}\right )}{\sqrt {a} d}-\frac {2 (A-5 B) \sin (c+d x)}{15 d \sqrt {\sec (c+d x)} \sqrt {a \sec (c+d x)+a}}+\frac {2 A \sin (c+d x)}{5 d \sec ^{\frac {3}{2}}(c+d x) \sqrt {a \sec (c+d x)+a}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 3893
Rule 4098
Rule 4107
Rule 4171
Rubi steps
\begin {align*} \int \frac {A+B \sec (c+d x)+C \sec ^2(c+d x)}{\sec ^{\frac {5}{2}}(c+d x) \sqrt {a+a \sec (c+d x)}} \, dx &=\frac {2 A \sin (c+d x)}{5 d \sec ^{\frac {3}{2}}(c+d x) \sqrt {a+a \sec (c+d x)}}+\frac {2 \int \frac {-\frac {1}{2} a (A-5 B)+\frac {1}{2} a (4 A+5 C) \sec (c+d x)}{\sec ^{\frac {3}{2}}(c+d x) \sqrt {a+a \sec (c+d x)}} \, dx}{5 a}\\ &=\frac {2 A \sin (c+d x)}{5 d \sec ^{\frac {3}{2}}(c+d x) \sqrt {a+a \sec (c+d x)}}-\frac {2 (A-5 B) \sin (c+d x)}{15 d \sqrt {\sec (c+d x)} \sqrt {a+a \sec (c+d x)}}+\frac {4 \int \frac {\frac {1}{4} a^2 (13 A-5 B+15 C)-\frac {1}{2} a^2 (A-5 B) \sec (c+d x)}{\sqrt {\sec (c+d x)} \sqrt {a+a \sec (c+d x)}} \, dx}{15 a^2}\\ &=\frac {2 A \sin (c+d x)}{5 d \sec ^{\frac {3}{2}}(c+d x) \sqrt {a+a \sec (c+d x)}}-\frac {2 (A-5 B) \sin (c+d x)}{15 d \sqrt {\sec (c+d x)} \sqrt {a+a \sec (c+d x)}}+\frac {2 (13 A-5 B+15 C) \sqrt {\sec (c+d x)} \sin (c+d x)}{15 d \sqrt {a+a \sec (c+d x)}}+(-A+B-C) \int \frac {\sqrt {\sec (c+d x)}}{\sqrt {a+a \sec (c+d x)}} \, dx\\ &=\frac {2 A \sin (c+d x)}{5 d \sec ^{\frac {3}{2}}(c+d x) \sqrt {a+a \sec (c+d x)}}-\frac {2 (A-5 B) \sin (c+d x)}{15 d \sqrt {\sec (c+d x)} \sqrt {a+a \sec (c+d x)}}+\frac {2 (13 A-5 B+15 C) \sqrt {\sec (c+d x)} \sin (c+d x)}{15 d \sqrt {a+a \sec (c+d x)}}+\frac {(2 (A-B+C)) \text {Subst}\left (\int \frac {1}{2 a-x^2} \, dx,x,-\frac {a \sqrt {\sec (c+d x)} \sin (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{d}\\ &=-\frac {\sqrt {2} (A-B+C) \tanh ^{-1}\left (\frac {\sqrt {a} \sqrt {\sec (c+d x)} \sin (c+d x)}{\sqrt {2} \sqrt {a+a \sec (c+d x)}}\right )}{\sqrt {a} d}+\frac {2 A \sin (c+d x)}{5 d \sec ^{\frac {3}{2}}(c+d x) \sqrt {a+a \sec (c+d x)}}-\frac {2 (A-5 B) \sin (c+d x)}{15 d \sqrt {\sec (c+d x)} \sqrt {a+a \sec (c+d x)}}+\frac {2 (13 A-5 B+15 C) \sqrt {\sec (c+d x)} \sin (c+d x)}{15 d \sqrt {a+a \sec (c+d x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.92, size = 155, normalized size = 0.81 \begin {gather*} -\frac {4 \cos \left (\frac {1}{2} (c+d x)\right ) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \left (15 (A-B+C) \tanh ^{-1}\left (\sin \left (\frac {1}{2} (c+d x)\right )\right )-30 (A+C) \sin \left (\frac {1}{2} (c+d x)\right )+20 (A+B) \sin ^3\left (\frac {1}{2} (c+d x)\right )-24 A \sin ^5\left (\frac {1}{2} (c+d x)\right )\right )}{15 d (A+2 C+2 B \cos (c+d x)+A \cos (2 c+2 d x)) \sec ^{\frac {3}{2}}(c+d x) \sqrt {a (1+\sec (c+d x))}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.24, size = 263, normalized size = 1.38
method | result | size |
default | \(\frac {\sqrt {\frac {a \left (1+\cos \left (d x +c \right )\right )}{\cos \left (d x +c \right )}}\, \left (15 \arctan \left (\frac {\sin \left (d x +c \right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}}{2}\right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, A \sin \left (d x +c \right )-6 A \left (\cos ^{3}\left (d x +c \right )\right )-15 \arctan \left (\frac {\sin \left (d x +c \right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}}{2}\right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, B \sin \left (d x +c \right )+15 C \arctan \left (\frac {\sin \left (d x +c \right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}}{2}\right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right )+8 A \left (\cos ^{2}\left (d x +c \right )\right )-10 B \left (\cos ^{2}\left (d x +c \right )\right )-28 A \cos \left (d x +c \right )+20 B \cos \left (d x +c \right )-30 C \cos \left (d x +c \right )+26 A -10 B +30 C \right ) \left (\cos ^{3}\left (d x +c \right )\right ) \left (\frac {1}{\cos \left (d x +c \right )}\right )^{\frac {5}{2}}}{15 d \sin \left (d x +c \right ) a}\) | \(263\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 742 vs.
\(2 (162) = 324\).
time = 0.71, size = 742, normalized size = 3.88 \begin {gather*} \frac {\frac {\sqrt {2} {\left (60 \, \cos \left (\frac {4}{5} \, \arctan \left (\sin \left (\frac {5}{2} \, d x + \frac {5}{2} \, c\right ), \cos \left (\frac {5}{2} \, d x + \frac {5}{2} \, c\right )\right )\right ) \sin \left (\frac {5}{2} \, d x + \frac {5}{2} \, c\right ) - 5 \, \cos \left (\frac {2}{5} \, \arctan \left (\sin \left (\frac {5}{2} \, d x + \frac {5}{2} \, c\right ), \cos \left (\frac {5}{2} \, d x + \frac {5}{2} \, c\right )\right )\right ) \sin \left (\frac {5}{2} \, d x + \frac {5}{2} \, c\right ) - 60 \, \cos \left (\frac {5}{2} \, d x + \frac {5}{2} \, c\right ) \sin \left (\frac {4}{5} \, \arctan \left (\sin \left (\frac {5}{2} \, d x + \frac {5}{2} \, c\right ), \cos \left (\frac {5}{2} \, d x + \frac {5}{2} \, c\right )\right )\right ) + 5 \, \cos \left (\frac {5}{2} \, d x + \frac {5}{2} \, c\right ) \sin \left (\frac {2}{5} \, \arctan \left (\sin \left (\frac {5}{2} \, d x + \frac {5}{2} \, c\right ), \cos \left (\frac {5}{2} \, d x + \frac {5}{2} \, c\right )\right )\right ) - 30 \, \log \left (\cos \left (\frac {1}{5} \, \arctan \left (\sin \left (\frac {5}{2} \, d x + \frac {5}{2} \, c\right ), \cos \left (\frac {5}{2} \, d x + \frac {5}{2} \, c\right )\right )\right )^{2} + \sin \left (\frac {1}{5} \, \arctan \left (\sin \left (\frac {5}{2} \, d x + \frac {5}{2} \, c\right ), \cos \left (\frac {5}{2} \, d x + \frac {5}{2} \, c\right )\right )\right )^{2} + 2 \, \sin \left (\frac {1}{5} \, \arctan \left (\sin \left (\frac {5}{2} \, d x + \frac {5}{2} \, c\right ), \cos \left (\frac {5}{2} \, d x + \frac {5}{2} \, c\right )\right )\right ) + 1\right ) + 30 \, \log \left (\cos \left (\frac {1}{5} \, \arctan \left (\sin \left (\frac {5}{2} \, d x + \frac {5}{2} \, c\right ), \cos \left (\frac {5}{2} \, d x + \frac {5}{2} \, c\right )\right )\right )^{2} + \sin \left (\frac {1}{5} \, \arctan \left (\sin \left (\frac {5}{2} \, d x + \frac {5}{2} \, c\right ), \cos \left (\frac {5}{2} \, d x + \frac {5}{2} \, c\right )\right )\right )^{2} - 2 \, \sin \left (\frac {1}{5} \, \arctan \left (\sin \left (\frac {5}{2} \, d x + \frac {5}{2} \, c\right ), \cos \left (\frac {5}{2} \, d x + \frac {5}{2} \, c\right )\right )\right ) + 1\right ) + 6 \, \sin \left (\frac {5}{2} \, d x + \frac {5}{2} \, c\right ) - 5 \, \sin \left (\frac {3}{5} \, \arctan \left (\sin \left (\frac {5}{2} \, d x + \frac {5}{2} \, c\right ), \cos \left (\frac {5}{2} \, d x + \frac {5}{2} \, c\right )\right )\right ) + 60 \, \sin \left (\frac {1}{5} \, \arctan \left (\sin \left (\frac {5}{2} \, d x + \frac {5}{2} \, c\right ), \cos \left (\frac {5}{2} \, d x + \frac {5}{2} \, c\right )\right )\right )\right )} A}{\sqrt {a}} - \frac {10 \, {\left (3 \, \sqrt {2} \cos \left (\frac {2}{3} \, \arctan \left (\sin \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right ), \cos \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right )\right )\right ) \sin \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right ) - 3 \, \sqrt {2} \cos \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right ) \sin \left (\frac {2}{3} \, \arctan \left (\sin \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right ), \cos \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right )\right )\right ) - 3 \, \sqrt {2} \log \left (\cos \left (\frac {1}{3} \, \arctan \left (\sin \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right ), \cos \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right )\right )\right )^{2} + \sin \left (\frac {1}{3} \, \arctan \left (\sin \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right ), \cos \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right )\right )\right )^{2} + 2 \, \sin \left (\frac {1}{3} \, \arctan \left (\sin \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right ), \cos \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right )\right )\right ) + 1\right ) + 3 \, \sqrt {2} \log \left (\cos \left (\frac {1}{3} \, \arctan \left (\sin \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right ), \cos \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right )\right )\right )^{2} + \sin \left (\frac {1}{3} \, \arctan \left (\sin \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right ), \cos \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right )\right )\right )^{2} - 2 \, \sin \left (\frac {1}{3} \, \arctan \left (\sin \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right ), \cos \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right )\right )\right ) + 1\right ) - 2 \, \sqrt {2} \sin \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right ) + 3 \, \sqrt {2} \sin \left (\frac {1}{3} \, \arctan \left (\sin \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right ), \cos \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right )\right )\right )\right )} B}{\sqrt {a}} - \frac {30 \, {\left (\sqrt {2} \log \left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 2 \, \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right ) - \sqrt {2} \log \left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 2 \, \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right ) - 4 \, \sqrt {2} \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )} C}{\sqrt {a}}}{60 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 3.72, size = 398, normalized size = 2.08 \begin {gather*} \left [\frac {\frac {15 \, \sqrt {2} {\left ({\left (A - B + C\right )} a \cos \left (d x + c\right ) + {\left (A - B + C\right )} a\right )} \log \left (-\frac {\cos \left (d x + c\right )^{2} + \frac {2 \, \sqrt {2} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right )}{\sqrt {a}} - 2 \, \cos \left (d x + c\right ) - 3}{\cos \left (d x + c\right )^{2} + 2 \, \cos \left (d x + c\right ) + 1}\right )}{\sqrt {a}} + \frac {4 \, {\left (3 \, A \cos \left (d x + c\right )^{3} - {\left (A - 5 \, B\right )} \cos \left (d x + c\right )^{2} + {\left (13 \, A - 5 \, B + 15 \, C\right )} \cos \left (d x + c\right )\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{\sqrt {\cos \left (d x + c\right )}}}{30 \, {\left (a d \cos \left (d x + c\right ) + a d\right )}}, \frac {15 \, \sqrt {2} {\left ({\left (A - B + C\right )} a \cos \left (d x + c\right ) + {\left (A - B + C\right )} a\right )} \sqrt {-\frac {1}{a}} \arctan \left (\frac {\sqrt {2} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sqrt {-\frac {1}{a}} \sqrt {\cos \left (d x + c\right )}}{\sin \left (d x + c\right )}\right ) + \frac {2 \, {\left (3 \, A \cos \left (d x + c\right )^{3} - {\left (A - 5 \, B\right )} \cos \left (d x + c\right )^{2} + {\left (13 \, A - 5 \, B + 15 \, C\right )} \cos \left (d x + c\right )\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{\sqrt {\cos \left (d x + c\right )}}}{15 \, {\left (a d \cos \left (d x + c\right ) + a d\right )}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {A+\frac {B}{\cos \left (c+d\,x\right )}+\frac {C}{{\cos \left (c+d\,x\right )}^2}}{\sqrt {a+\frac {a}{\cos \left (c+d\,x\right )}}\,{\left (\frac {1}{\cos \left (c+d\,x\right )}\right )}^{5/2}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________